﻿<%@ Page Language="C#" MasterPageFile="../Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Longtop.Web.WebSite.Admin.Home.IndexModel>" %>

<%@ Import Namespace="Longtop.Web.SaleWeb.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <script language="javascript" type="text/javascript">
        //点击刷新
        var Dialog_Btn_Refresh = "点击刷新";
        //Div对话框提交按钮
        var Dialog_Btn_Submit = "确  定";
        //Div对话框取消按钮
        var Dialog_Btn_Cancel = "取  消";
        //Div对话框关闭按钮
        var Dialog_Btn_Close = "";
        //退出系统的标题
        var Logout_Title = "退出LongtopCMS网站后台管理系统";
        //Logout_Msg
        var Logout_Msg = "您确定要退出网站后台管理系统吗？";
        //Save
        var Dialog_Btn_Save = "保  存";
        //页面加载中
        var Dialog_Loading = "页面载入中，请稍后...";
        //操作进行中
        var Dialog_Operating = "操作正在进行中，请等待...";
        //消息头文字
        var SysMsgTitle = "友情提示";
        //当前正在加载的页面I
        var loadingIframeId = "";
        //当前正在加载的页面Url
        var loadingRrl = "";
        function Logou() {
            window.open('<%=Url.Action("logoff","account") %>', "_self");
        }
    </script>

    <div class="wrapper" id="layout" style="width: 100%; height: 100%">
        <!--头部定义-->
        <div id="TopFrom" class="topbg">
            <div class="logo">
                &nbsp;</div>
            <div id="right">
                <table cellspacing="0" cellpadding="0" width="400" align="right" border="0">
                    <tr>
                        <td>
                            <div class="welcom" style="height: 20px">
                                <%Html.RenderPartial("LogOnUserControl"); %>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="nav" style="float: right; width: 300px">
                                <div class="list">
                                    <a href="javascript:MM_OpenTabLayers('修改密码','<%=Url.Action("changepassword", "account")%>','EditPass')">
                                        修改密码 </a>
                                </div>
                                <div style="float: right; margin: 0px 6px">
                                    <%=Html.Image("~/content/images/top-line.gif") %>
                                </div>
                                <%--<asp:Literal ID="Lit_Lang" runat="server" />--%>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <!--头部结束-->
        <!--中间定义-->
        <div id="CenFrom">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="centTable">
                <tr>
                    <td valign="top" align="left" style="width: 196px;">
              <div id="leftMenu">
                <div id="MenuBottom"> <%=Html.Image("~/content/images/menu_topimg.gif", new { width=182,height=2})%></div>
              <%if (Roles.IsUserInRole("system")) { %>
                <div id="Menu">
                
	<div class="menuRootBg" id="MenuRoot">系统配置</div>	<div class="menusubBtn" id="MenuSub">
		<div id="MenuLine">  <%=Html.Image("~/content/images/menu_topline.gif", new { wdith = 182, height = 5 })%></div>
		  <a onclick="MM_OpenTabLayers('系统配置','<%=Url.RouteUrl(new{controller="labels"}) %>','root1')"
                                        href="javascript:void(0);">标签管理</a> <a onclick="MM_OpenTabLayers('角色管理','<%=Url.RouteUrl(new{controller="roles"}) %>','root2')"
                                            href="javascript:void(0);">角色管理</a>
	</div></div>
 <%} foreach (var item in Model.Roles) {
                    var index = 0;
                    foreach (var itemm in item.Permissions.Where(l => l.LableId.HasValue).GroupBy(p => HomeController.Menus.Values.First(m => m.LableId == p.LableId).Text).OrderBy(x => x.Key)) {
                        index++;
                        %>
	<div id="Menu">
		<div class="menuRootBg" id="MenuRoot"><%=itemm.Key%></div>	<div class="menusubBtn" id="MenuSub">
		<div id="MenuLine">  <%=Html.Image("~/content/images/menu_topline.gif", new { wdith = 182, height = 5 })%></div>
		 <%foreach (var g in itemm) {
                                          %>
                                    <a onclick="MM_OpenTabLayers('<%= g.GetText() %>','<%=Url.RouteUrl(g.GetRouteValues()) %>','<%=g.Id %>')"
                                        href="javascript:void(0);">
                                        <%=g.GetText()%></a>
                                    <%   
     }
                                    %>
	</div></div>
	
	<%}
                } %>
                <div id="div9">   <%=Html.Image("~/content/images/menu_bottomimg.gif", new { width = 182, height = 2 })%></div>
              </div>
              <div style="margin-top: 12px; padding-left: 11px;">
              <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=de945b57dd14ce191fd79c1ca8c3180773908ec533b0737db40788db3546e1d7"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=de945b57dd14ce191fd79c1ca8c3180773908ec533b0737db40788db3546e1d7';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;">
                         
                           提交改善意见
                           <img border="0" SRC='http://wpa.qq.com/pa?p=1:7652079:45' alt="反馈问题给开发人员"></a> </td>
                    <%--<td style="width: 196px" valign="top" align="left">
                        <div id="leftMenu">
                            <div id="MenuBottom">
                            </div>
                            <%if (Roles.IsUserInRole("system")) { %>
                            <div id="Menu">
                                <div class="menuRootBg" id="MenuRoot">
                                    系统配置</div>
                                <div class="menusubBtn" id="MenuSub">
                                    <div id="MenuLine">
                                        <%=Html.Image("~/content/images/menu_topline.gif", new { wdith = 182, height = 5 })%>
                                    </div>
                                    <a onclick="MM_OpenTabLayers('系统配置','<%=Url.RouteUrl(new{controller="labels"}) %>','root1')"
                                        href="javascript:void(0);">标签管理</a> <a onclick="MM_OpenTabLayers('角色管理','<%=Url.RouteUrl(new{controller="roles"}) %>','root2')"
                                            href="javascript:void(0);">角色管理</a>
                                </div>
                            </div>
                            <%} foreach (var item in Model.Roles) {%>
                            <%foreach (var itemm in item.Permissions.Where(l => l.LableId.HasValue).GroupBy(p => HomeController.Menus.Values.First(m => m.LableId == p.LableId).Text).OrderBy(x => x.Key)) {%>
                            <div id="Menu">
                                <div class="menuRootBg" id="MenuRoot" title="<%=itemm.First().RoleName+"的管理任务" %>">
                                    <%=itemm.Key%>
                                </div>
                                <div class="menusubBtn" id="MenuSub">
                                    <div id="MenuLine">
                                        <%=Html.Image("~/content/images/menu_topline.gif", new { wdith=182,height=5})%>
                                    </div>
                                    <%foreach (var g in itemm) {
                                    %>
                                    <a onclick="MM_OpenTabLayers('<%= g.GetText() %>','<%=Url.RouteUrl(g.GetRouteValues()) %>','<%=g.Id %>')"
                                        href="javascript:void(0);">
                                        <%=g.GetText()%></a>
                                    <%   
                                        }
                                    %>
                                </div>
                            </div>
                            <%}
                              } %>
                            <div id="div9">
                                <%=Html.Image("~/content/images/menu_bottomimg.gif", new { width = 182, height = 2 })%>
                            </div>
                        </div>
                        <div style="text-align: center">
                              <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=de945b57dd14ce191fd79c1ca8c3180773908ec533b0737db40788db3546e1d7"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=de945b57dd14ce191fd79c1ca8c3180773908ec533b0737db40788db3546e1d7';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;">
                         
                           提交改善意见
                           <img border="0" SRC='http://wpa.qq.com/pa?p=1:7652079:45' alt="反馈问题给开发人员"></a>
                        </div>
                    </td>--%>
                    <td class="content" valign="top" align="left" id="Maintable">
                        <div class="content" id="div_Main">
                            <div id="div_Main_Page">
                                <!--页面访问导行开始-->
                                <div style="position: absolute; left: 189px; top: 64px;">
                                    <%=Html.Image("~/content/images/left-top-right.gif")%>
                                </div>
                                <div id="nav">
                                    <div class="right" id="tabtitle">
                                        <table width="30" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td style="width: 15px">
                                                    <%=Html.Image("~/content/images/icon-pve.gif", new { alt="向左移动",width=12,height=12,id="tagProtBtn",onclick="TabPage('left');"})%>
                                                </td>
                                                <td style="width: 15px" align="right">
                                                    <%=Html.Image("~/content/images/icon-next.gif", new { alt = "向左移动", width = 12, height = 12, id = "tagNextBtn", onclick = "TabPage('right');" })%>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <!--页面访问导行结束-->
                                <!-----主体内容开始----->
                                <div id="div_Main_Content">
                                </div>
                                <!-----主体内容结束----->
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <!--中间结束-->
        <!--底部定义-->
        <div id="BottomFrom" class="bottombg">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="width: 18%">
                        <%=Html.Image("~/content/images/buttom-left.gif", new { width=198,height=54})%>
                    </td>
                    <td width="67%" align="center" class="copyright">
                        Copyright © 2009-2010 厦门互宇信息科技有限公司
                    </td>
                    <td width="15%" align="right">
                        <%=Html.Image("~/content/images/buttom-right.gif", new { width = 161, height = 54 })%>
                    </td>
                </tr>
            </table>
        </div>
        <!--底部结束-->
    </div>

    <script type="text/javascript">

        var DefentStr1 = '<img src=\"<%=Url.Content("~/content/images/icon-index.gif") %>\" width=\"11\" height=\"10\" align=\"absmiddle\" /> 首 页&nbsp;&nbsp;';
        MM_OpenTabLayers(DefentStr1, '<%=Url.Action("welcome") %>', "Defent");
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Scripts" runat="Server">
    <%=Html.Script("~/scripts/js/admin/common.js") %>
    <%=Html.Script("~/scripts/js/admin/prototype.js")%>
  
    <%=Html.Script("~/scripts/js/admin/Utils.js")%>
    <%=Html.Script("~/scripts/js/admin/DivDialog.js")%>
    <%=Html.Script("~/scripts/js/admin/Dialog.js")%>
</asp:Content>
